package com.qilu.pe.ui.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.qilu.pe.R;
import com.qilu.pe.dao.bean.SickDetail;
import com.ruitu.arad.base.BaseFragment;

// 疾病详情1界面
public class SickDetai1Fragment extends BaseFragment {
    private TextView tv_medical_show, tv_health_danger, tv_assist_test;

    private SickDetail detail;

    public SickDetai1Fragment() {

    }

    public static SickDetai1Fragment newInstance(String param1, SickDetail detail) {
        SickDetai1Fragment fragment = new SickDetai1Fragment();
        Bundle args = new Bundle();
        args.putSerializable("detail", detail);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        detail = (SickDetail) getArguments().getSerializable("detail");
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.fragment_sick_detai1, container, false);
        tv_medical_show = v.findViewById(R.id.tv_medical_show);
        tv_health_danger = v.findViewById(R.id.tv_health_danger);
        tv_assist_test = v.findViewById(R.id.tv_assist_test);

        if (null != detail) {
            tv_medical_show.setText(detail.getManifestation());
            tv_health_danger.setText(detail.getHealth());
            tv_assist_test.setText(detail.getAssist());
        }

        return v;
    }
}